﻿using System;

namespace SortThreeRealNumbers
{
    class SortNestedIfThreeRealNumbers
    {
        static void Main(string[] args)
        {
            //Sort three real numbers
            Console.WriteLine("First:");
            double firstNumber = double.Parse(Console.ReadLine());
            Console.WriteLine("Second:");
            double secondNumber = double.Parse(Console.ReadLine());
            Console.WriteLine("Third:");
            double thirdNumber = double.Parse(Console.ReadLine());
            Console.WriteLine();
            if (firstNumber >= secondNumber)
            {
                if (firstNumber > thirdNumber)
                {
                    Console.WriteLine("Biggest is: {0}", firstNumber);
                    if (secondNumber > thirdNumber)
                    {
                        Console.WriteLine("Between is: {0}", secondNumber);
                        Console.WriteLine("Last is: {0}", thirdNumber);
                    }
                    else if (secondNumber == thirdNumber)
                    {
                        Console.WriteLine("Second number is: {0} and Third:{1} are equal", secondNumber, thirdNumber);
                    }
                    else
                    {
                        Console.WriteLine("Third number : {0} is bigger than Second {1}", thirdNumber, secondNumber);
                    }

                }
                else if (firstNumber == thirdNumber)
                {
                    Console.WriteLine("They are equal.");
                }
            }
            if (secondNumber >= firstNumber)
            {
                if (secondNumber > thirdNumber)
                {
                    Console.WriteLine("Biggest is: {0}", secondNumber);
                    if (firstNumber>thirdNumber)
                    {
                        Console.WriteLine("Between is: {0}", firstNumber);
                        Console.WriteLine("Last is: {0}", thirdNumber);
                    }
                    else if (firstNumber == thirdNumber)
                    {
                        Console.WriteLine("First number is: {0} and Third:{1} are equal", firstNumber, thirdNumber);
                    }
                    else
                    {
                        Console.WriteLine("Third number : {0} is bigger than first {1}", thirdNumber, firstNumber);
                    }
                }
            }
            if (thirdNumber >= firstNumber)
            {
                if (thirdNumber > secondNumber)
                {
                    Console.WriteLine("Biggest is: {0}", thirdNumber);
                    if (secondNumber > firstNumber)
                    {
                        Console.WriteLine("Between is: {0}", secondNumber);
                        Console.WriteLine("Last is: {0}", firstNumber);
                    }
                    else if (secondNumber == firstNumber)
                    {
                        Console.WriteLine("Second number is: {0} and First:{1} are equal", secondNumber, firstNumber);
                    }
                    else if(firstNumber>secondNumber)
                    {
                        Console.WriteLine("First number : {0} is bigger than second {1}", firstNumber,secondNumber);
                    }
                    else
                    {
                        Console.WriteLine("Second number : {0} is bigger than first {1}", secondNumber, firstNumber);
                    }
                }
            }
        }
    }
}